package org.jeecg.modules.biz.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.biz.entity.BurnIncome;

public interface BurnIncomeMapper extends BaseMapper<BurnIncome> {

    boolean updateBalanceByAddress(@Param("balance") Integer balance, @Param("address") String address);

    @Select("select balance - freezing_amount from biz_burn_income where address = #{address}")
    Long canWithdrawalAmount(@Param("address") String address);
}
